package com.bank.model.enums;

import lombok.Getter;

/**
 * @author Cejay1314
 * @version 1.0
 * @create 2023/3/28 11:54
 */

@Getter
public enum DepositStatusEnum {

    ING(1,"进行中"),
    TAKE(2, "可取款"),
    FINISHED(3, "已结束")

    ;
    private Integer code;
    private String message;

    private DepositStatusEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static String gertName(int code){
        for(DepositStatusEnum item: values()){
            if(item.getCode()==code){
                return item.message;
            }
        }
        return "";
    }
}
